# coding: utf-8

"""
    SnapTrade

    Connect brokerage accounts to your app for live positions and trading

    The version of the OpenAPI document: 1.0.0
    Contact: api@snaptrade.com
    Created by: https://snaptrade.com/
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from snaptrade_client import schemas  # noqa: F401


class StrategyImpactLegsItem(
    schemas.DictSchema
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)
    """


    class MetaOapg:
        
        class properties:
            legId = schemas.Int32Schema
            symbol = schemas.StrSchema
            symbolId = schemas.Int32Schema
            legRatioQuantity = schemas.Int32Schema
            side = schemas.StrSchema
            avgExecPrice = schemas.StrSchema
            lastExecPrice = schemas.StrSchema
            __annotations__ = {
                "legId": legId,
                "symbol": symbol,
                "symbolId": symbolId,
                "legRatioQuantity": legRatioQuantity,
                "side": side,
                "avgExecPrice": avgExecPrice,
                "lastExecPrice": lastExecPrice,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["legId"]) -> MetaOapg.properties.legId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["symbol"]) -> MetaOapg.properties.symbol: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["symbolId"]) -> MetaOapg.properties.symbolId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["legRatioQuantity"]) -> MetaOapg.properties.legRatioQuantity: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["side"]) -> MetaOapg.properties.side: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["avgExecPrice"]) -> MetaOapg.properties.avgExecPrice: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["lastExecPrice"]) -> MetaOapg.properties.lastExecPrice: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["legId"], typing_extensions.Literal["symbol"], typing_extensions.Literal["symbolId"], typing_extensions.Literal["legRatioQuantity"], typing_extensions.Literal["side"], typing_extensions.Literal["avgExecPrice"], typing_extensions.Literal["lastExecPrice"], str, ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["legId"]) -> typing.Union[MetaOapg.properties.legId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["symbol"]) -> typing.Union[MetaOapg.properties.symbol, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["symbolId"]) -> typing.Union[MetaOapg.properties.symbolId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["legRatioQuantity"]) -> typing.Union[MetaOapg.properties.legRatioQuantity, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["side"]) -> typing.Union[MetaOapg.properties.side, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["avgExecPrice"]) -> typing.Union[MetaOapg.properties.avgExecPrice, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["lastExecPrice"]) -> typing.Union[MetaOapg.properties.lastExecPrice, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["legId"], typing_extensions.Literal["symbol"], typing_extensions.Literal["symbolId"], typing_extensions.Literal["legRatioQuantity"], typing_extensions.Literal["side"], typing_extensions.Literal["avgExecPrice"], typing_extensions.Literal["lastExecPrice"], str, ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        legId: typing.Union[MetaOapg.properties.legId, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        symbol: typing.Union[MetaOapg.properties.symbol, str, schemas.Unset] = schemas.unset,
        symbolId: typing.Union[MetaOapg.properties.symbolId, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        legRatioQuantity: typing.Union[MetaOapg.properties.legRatioQuantity, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        side: typing.Union[MetaOapg.properties.side, str, schemas.Unset] = schemas.unset,
        avgExecPrice: typing.Union[MetaOapg.properties.avgExecPrice, str, schemas.Unset] = schemas.unset,
        lastExecPrice: typing.Union[MetaOapg.properties.lastExecPrice, str, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
    ) -> 'StrategyImpactLegsItem':
        return super().__new__(
            cls,
            *args,
            legId=legId,
            symbol=symbol,
            symbolId=symbolId,
            legRatioQuantity=legRatioQuantity,
            side=side,
            avgExecPrice=avgExecPrice,
            lastExecPrice=lastExecPrice,
            _configuration=_configuration,
            **kwargs,
        )
